package C10_14_ReplaceErrorCodeWithException.after_refactor_2受控异常;

import org.junit.Test;

/**
 * 调用者
 */
public class Invoker {
    @Test
    public void test(){
        Account account = new Account();
        int amount = 100;
        try {
            account.withdraw(amount);
        } catch (BalanceException e) {
            handleOverdrawn();
        }
    }
    /**
     * 透支处理
     */
    private void handleOverdrawn() {
    }
}
